Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces OpenTelemetry support to the Microsoft Testing Platform, enabling distributed tracing and metrics collection for test runs. The implementation provides instrumentation capabilities while maintaining compatibility with the platform's netstandard2.0 target framework.
Key changes include:
- Added new
Microsoft.Testing.Extensions.OpenTelemetryextension project with OpenTelemetry integration - Introduced telemetry interfaces and platform services for activity tracking, counters, and histograms
- Updated existing services to accept the new OpenTelemetry service parameter and instrument test execution flows
- Enhanced the Playground sample to demonstrate OpenTelemetry usage with OTLP exporters
Reviewed Changes
Copilot reviewed 40 out of 40 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
src/Platform/Microsoft.Testing.Platform/Telemetry/TelemetryManager.cs |
Added OpenTelemetry provider support and renamed BuildAsync to BuildTelemetryAsync |
src/Platform/Microsoft.Testing.Platform/Services/TestApplicationResult.cs |
Added OpenTelemetry service integration and test execution instrumentation |
src/Platform/Microsoft.Testing.Extensions.OpenTelemetry/ |
New extension project providing OpenTelemetry wrappers and platform service implementation |
test/UnitTests/ |
Updated test constructors to accommodate new OpenTelemetry service parameter |
src/Platform/Microsoft.Testing.Platform/Hosts/ |
Added activity tracking throughout host execution flows |
samples/Playground/ |
Added OpenTelemetry configuration example with tracing and metrics |
src/Platform/Microsoft.Testing.Platform/ServerMode/JsonRpc/Json/Json.cs
Outdated
Show resolved
Hide resolved
src/Platform/Microsoft.Testing.Extensions.OpenTelemetry/OpenTelemetryProvider.cs
Outdated
Show resolved
Hide resolved
src/Platform/Microsoft.Testing.Extensions.OpenTelemetry/OpenTelemetryPlatformService.cs
Outdated
Show resolved
Hide resolved
Evangelink
commented
Sep 4, 2025
src/Platform/Microsoft.Testing.Platform/ServerMode/JsonRpc/Json/Json.cs
Outdated
Show resolved
Hide resolved
Youssef1313
reviewed
Sep 4, 2025
src/Platform/Microsoft.Testing.Extensions.OpenTelemetry/OpenTelemetryPlatformService.cs
Outdated
Show resolved
Hide resolved
Evangelink
commented
Sep 4, 2025
src/Platform/Microsoft.Testing.Platform/Hosts/ServerTestHost.cs
Outdated
Show resolved
Hide resolved
src/Platform/Microsoft.Testing.Platform/Telemetry/ITelemetryManager.cs
Outdated
Show resolved
Hide resolved
src/Platform/Microsoft.Testing.Extensions.OpenTelemetry/OpenTelemetryPlatformService.cs
Outdated
Show resolved
Hide resolved
src/Platform/Microsoft.Testing.Extensions.OpenTelemetry/OpenTelemetryPlatformService.cs
Outdated
Show resolved
Hide resolved
src/Platform/Microsoft.Testing.Extensions.OpenTelemetry/OpenTelemetryProvider.cs
Show resolved
Hide resolved
src/Platform/Microsoft.Testing.Extensions.OpenTelemetry/OpenTelemetryProvider.cs
Outdated
Show resolved
Hide resolved
filzrev
reviewed
Sep 4, 2025
src/Platform/Microsoft.Testing.Extensions.OpenTelemetry/OpenTelemetryProvider.cs
Show resolved
Hide resolved
Evangelink
commented
Oct 7, 2025
# Conflicts: # Directory.Packages.props
Youssef1313
reviewed
Oct 21, 2025
Youssef1313
reviewed
Oct 21, 2025
src/Platform/Microsoft.Testing.Platform/Telemetry/Activities.cs
Outdated
Show resolved
Hide resolved
Youssef1313
reviewed
Oct 21, 2025
Youssef1313
reviewed
Oct 21, 2025
Member
Youssef1313
left a comment
There was a problem hiding this comment.
It's probably nice if we can have a complete sample, whether it's using Aspire or something else.
# Conflicts: # samples/Playground/Program.cs
Youssef1313
reviewed
Oct 30, 2025
Evangelink
commented
Oct 31, 2025
Youssef1313
reviewed
Oct 31, 2025
# Conflicts: # Directory.Packages.props # test/UnitTests/Microsoft.Testing.Platform.UnitTests/ServerMode/ServerTests.cs
MarcoRossignoli
approved these changes
Dec 12, 2025
MarcoRossignoli
approved these changes
Dec 12, 2025
MarcoRossignoli
approved these changes
Dec 12, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces OpenTelemetry support to the platform, enabling distributed tracing and metrics collection for test runs. The main changes include adding a new extension project for OpenTelemetry integration, updating dependencies and sample usage, and instrumenting the test execution flow to emit telemetry data.
Added new project
Microsoft.Testing.Extensions.OpenTelemetrywith wrappers for activities, counters, and histograms, and a platform service implementation for telemetry instrumentation.Modified
Playground.csprojandProgram.csto demonstrate enabling OpenTelemetry tracing and metrics via the new provider and exporter.View on Aspire: